---
title: "SQL-VP-012: Retrieve the most recent audit date for a policy"
summary: Retrieves the latest audit date for a policy via inline Oracle SQL.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-VP-012 Retrieve the most recent audit date for a policy

Returns the maximum audit date recorded for a policy in `PA_AUDIT`, used by
`clsPolicyData.GetLastAuditDate`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-VP-012 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsPolicyData` |
| **Criteria property** | `GetLastAuditDate()` (ad hoc method) |
| **Lifecycle method** | ad hoc method |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PolicyNumber` | Input | Decimal | N/A | Policy number to look up the last audit date for. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PA_AUDIT](../database-tables.md#pa_audit) | SELECT | `POLICY_NUM`, `AUDIT_DATE` |

## Sample SQL

```sql
SELECT
  MAX(PA_AUDIT.AUDIT_DATE)
FROM
  PA_AUDIT
WHERE
  PA_AUDIT.POLICY_NUM = :PolicyNumber
```

*Column names inferred from method naming (`GetLastAuditDate`); exact column list not fully captured
in prior source review.*

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsPolicyData.vb`
